import {http} from '../utils/http'
export const postUserCartAPI=(data)=>{ 
    return http({
        method: 'POST',
        url: '/cart/add',
        data
       
    })
}
//获取用户购物车列表
export const getUserCartAPI=()=>{ 
    return http({
        method: 'GET',
        url: '/cart',
    })
}
//删除购物车商品
export const deleteUserCartAPI=(ids)=>{ 
    return http({
        method: 'DELETE',
        url: '/cart',
        data: ids
    })
}
//修改购物车商品数量
export const updateUserCartBySkuIdAPI=(data)=>{ 
    return http({
        method: 'PUT',
        url: `/cart`,
        data
    })
}
//取消/全选购物车商品
export const selectAllUserCartAPI=(selected)=>{ 
    return http({
        method: 'PUT',
        url: `/cart/selected/${selected}`
    })
}
